package com.nantian.main;

import com.nantian.annotation.Cell;
import com.nantian.annotation.DateFormat;
import com.nantian.annotation.Regular;
import com.nantian.annotation.Sheet;

import java.util.Date;

/**
 * <p>ClassName: User</p>
 * <p>Description: </p>
 * <p>Copyright: Copyright©2014</p>
 * <p>Company: 广州南天电脑系统有限公司</p>
 * <p>Date: 2020-01-21</p>
 *
 * @author 刘晓辉
 * @version 1.0
 */
@Sheet(name = "用户名单")
public class User {
    @Cell(index = 1, title = "姓名")
    private String name;
    @Regular(regular = "^[1-9]\\\\d*$")
    @Cell(index = 10, title = "年龄")
    private int age;
    @Cell(index = 2, title = "性别")
    private int sex;
    @Cell(index = 3)
    private long longValue;
    @Cell(index = 4, title = "是否隐藏")
    private boolean hid;
    @Cell(index = 5, title = "额度")
    private float manery;
    @Cell(index = 6, empty = false, title = "源")
    private double source;
    @Cell(index = 7, title = "日期")
    private String date;
    @Cell(index = 8, title = "时间")
    @DateFormat(formate = "yyyy-MM-dd HH:mm:ss")
    private Date datetime;
    @Cell(index = 9, title = "字符串时间")
    private String time;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public long getLongValue() {
        return longValue;
    }

    public void setLongValue(long longValue) {
        this.longValue = longValue;
    }

    public boolean isHid() {
        return hid;
    }

    public void setHid(boolean hid) {
        this.hid = hid;
    }

    public float getManery() {
        return manery;
    }

    public void setManery(float manery) {
        this.manery = manery;
    }

    public double getSource() {
        return source;
    }

    public void setSource(double source) {
        this.source = source;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Date getDatetime() {
        return datetime;
    }

    public void setDatetime(Date datetime) {
        this.datetime = datetime;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", longValue=" + longValue +
                ", hid=" + hid +
                ", manery=" + manery +
                ", source=" + source +
                ", date='" + date + '\'' +
                ", datetime=" + datetime +
                ", time='" + time + '\'' +
                '}';
    }
}
